home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Amiga Collections: MegaDisc
/
MegaDisc 04 (1988)(MegaDisc Digital Publishing)(AU)[m][WB].zip
/
MegaDisc 04 (1988)(MegaDisc Digital Publishing)(AU)[m][WB].adf
/
CALCULATOR
/
CALC.manual
< prev
next >
Wrap
Text File
|
2007-12-01
|
23KB
|
542 lines
R.P.N. CALCULATOR "CALC" for the AMIGA (512 K) KEITH NEIGBOUR
----------------------------------------------------------------------
From Amiga Basic type in RUN "Megadisc4:Calculator/CALC" and ENTER.
( or click on "CALC" icon from Megadisc4 )
GENERAL DESCRIPTION
-------------------
This program "converts" the computer into a powerful and versatile
R.P.N. (Reverse Polish Notation) calculator, with an automatic four
register (4 memories) Stack, 10 sets of ten general Stores (100
memories) and other special Stores such as memories for Summations,
Last X and Last Y etc.
In addition to the four basic arithmetic functions, the calculator
currently provides over 70 key functions, and operations.
All conditions are displayed i.e. the Input, the Stack, (the Stores,
if in the Display mode), the function, and where appropriate, comment
or a message, and also the "working effect" of the function operation
on the Stack and Stores.
The calculator carries out all calculations in Double Precision (16
figure accuracy). The number handling capacity of the calculator is
from 9.9D-307 to 9.9D+307.
Numbers can be entered in Decimal format or Scientific Notation or as
Hexadecimal numbers and even as Octal or Binary numbers. This is
explained in detail under SPECIAL KEYS AND FUNCTIONS.
Generally, the operation of the Calculator functions is carried out by
clicking the Left Mouse button with the Mouse arrow over the
appropriate key or area.
Alternatively certain screen key functions can also be activated by
pressing appropriate keys on the computer key-board.
In all cases, whether from the screen or the keyboard, when a key is
selected, the particular screen key box surround color will change from
white to red, to confirm that it has been successfully activated.
Briefly, REVERSE POLISH NOTATION, for a simple arithmetic operation
(as an example), requires you to "lay down" two numbers (X and Y)
BEFORE instructing the calculator to add, deduct, multiply or
divide the two numbers. This differs from ordinary calculators, where
one number is entered, then the command to add or deduct etc. and then
the second number. R.P.N. is explained in more detail under "REVERSE
POLISH NOTATION".
The key pads shown on the screen display are activated by clicking the
left mouse button once, when the mouse arrow tip is within the small
rectangle framing a particular key.
THE FUNCTIONS OF THE SCREEN KEYS, AS SHOWN IN FIGURE 1 (below), ARE AS
FOLLOWS:
NUMERIC KEY PAD (Top Left Group)
---------------
Digits 0 to 9 and the Decimal point are used to "construct"
the number X in the normal way. The number will be displayed,
progressively above the numeric Key Pad (INPUT DISPLAY BOX)
and also in the X Register on the right hand side of the
screen.
/ Divide the value in the Y Register by the value in the X
Register.
* Multiply the two values in the Y and X Registers.
- Deduct, from the value in the Y Register, the value in the X
Register.
+ Add the two values in the Y and X Registers.
All of the four above operations will cause a "Stack Drop".
(This is explained in detail later under REVERSED POLISH
NOTATION).
ENT ENTER. The X value is duplicated into the Y Register causing
a "Stack Lift". That is, the Y value is transferred into the Z
Register and the Z value is transferred into the T Register.
The T value is "lost over the top".
The functions of the 16 keys in the screen Numeric key pad (within the
red boundary) can also be activated by the equivalent keys on the
computer key-board. Furthermore mixed-use is permitted. That is a
number can be partly keyed in from the screen Numric Keys and partly
from the computer keyboard.
C1X Clears (deletes) the number X.
CSk Clears the Register Stack (X, Y, Z & T)
( but NOT Last X or Y ).
CSt Clear the current STORES Set.
Inv Inverts the Stack (X, Y, Z, T to T, Z, Y, X).
ChS Changes the sign of X (+ to - or - to +).
Sk /\ Rolls the Stack UP (in a Loop).
Sk \/ Rolls the Stack DOWN (in a Loop).
StS Stores the value of X in a nominated Store S0 to S9 in the
current Store Set. After clicking on this key, click on the
chosen Store (S0 to S9). (A prompt will appear in the top
centre Remark Box).
RcS Recalls the value in the nominated store and transfers it into
the X Register.
(This causes a "Stack Lift").
After clicking on this key, click the appropriate Store number
as for StS.
SAr Store Arithmetic. This allows the value in the chosen store to
be multiplied by X, or divided by X, or added to X, or to have
X deducted from it. After clicking on this key, click
appropriate Store number as for StS, and then click the /, *,
- or + key, as required.
Exc Exchanges the values of the X and Y Registers.
LsX Recalls the value of the "Last X" (shown in the bottom right
box on the screen) into the X Register.
(This causes a Stack Lift).
LsY Recalls the value of "Last Y" (as for LsX).
SXS Swaps the values in the X Register and in the chosen Store.
After clicking on this key, click appropriate Store number as
for StS.
SYS Swaps Y with a Store as for SXS.
RdX Round the decimal component of X (if any) to a specified
number of places. After clicking on this key, you will be
prompted to "Key No. & ENTER". Click the digit(s) for the
required number of decimal places e.g. 3 or 10. The number
will appear in the Comment Box (see the "undo" function).
When correct, click on ENT.
This is a one-off operation.
RdF Rounds and Fixes (until cancelled) the number of decimal
places for all future calculations. Activate RdF as for RdX.
To stop rounding click on RdF a second time. This is a
"toggle" key. When it is ON a small red dot is displayed on
the key.
D>F Converts a decimal value to an equivalent fraction. If it is
not an exact fraction, it will produce an equivalent fraction
value within the accuracy limits of the computer. The
Numerator will be displayed in the Z Register and the
Denominator in the Y Register.
Abs Converts the value of X to its absolute value, that is, the
sign attributed to the number is removed.
Rn# Generates a Random Number. After clicking on this key you will
be prompted to "Key No. & ENTER". Click the digit(s) for the
upper limit random number required. (e.g. 10, 99,1000 etc.)
A random number between 1 and the upper limit, will then be
transferred into the X Register causing a Stack Lift.
Lge The "natural" Logarithm (Log. Base e) X will be substituted
for the original value of X, in the X Register.
Lgt As for Lge, but the Base 10 Logarithm.
ALe Subtitutes the Anti-log (Base e) value for the number in the X
Register. (This is the Exponential number of X).
ALt Substitutes the Anti-log (Base 10) of X for X in the X
Register.
NOTE that for the Trigonometric Pad, (the seven Trig Keys enclosed
in a red border), the current "Angles mode" of the calculator
must be taken into account. This is displayed under the
Numeric Key Pad as "Deg Mode" or "Rad Mode". The mode can be
toggled as Degrees or Radians, by clicking on the Deg or Rad
box.
Sin Substitues the Sine of X for the original value of X in the X
Register.
Cos Cosine X (as for Sine).
Tan Tangent X (as for Sine).
ASn Arc Sine X (as for Sine).
ACS Arc Cosine X (as for Sine).
ATn Arc Tangent X (as for Sine).
Hyp Clicking on this key and then clicking on any one of the six
above keys will carry out a Hyerbolic Trigonometric function.
(This is a "one-off" key operation, i.e. each time it is
required, the Hyp key must be clicked before the appropriate
trig key).
Sqr Substitutes the square of X in the X Register.
SRt Substitutes the square root of X for X in the X Register.
Fib Calculates a Fibonacci Series to an upper designated number.
After clicking on this key, you will be prompted to "Key No.
& ENTER". A Stack Lift occurs. Click the digits for the
required number. (The highest number which can be calculated
is 1475 ... this is a long calculation!). You will be
reminded if you try a higher number.
Fac Calculates the Factorial value of a number up to a limit of
170. Keying is the same proceedure as for Fib.
Y X Raises Y to the power of X.
This causes a Stack Drop.
InD Integer Division ... giving the Integer value of Y divided
by X.
This causes a Stack Drop.
Pi Tranfers the value of Pi into the X Register.
This will cause a Stack Lift.
Sci To enter a number in scientific notation (e.g. 1.123456789D16)
first click on Sci, and then simply construct the number in
this form, either from the screen keys of from the keyboard
(the D or E will have to be activated from the keyboard).
Int Substitutes the Integer value of X for X in the X Register.
Frc Substitutes the Decimal component of X for X in the X
Register.
Rec Substitutes the Reciprocal of X (1 divided by X) for X in the
X Register.
>H. Converts Hours (or Degrees), minutes and seconds to Decimal
Hours (or Decimal Degrees). The digits MUST be keyed in this
format BEFORE clicking >.H.
Hours (or Degrees) e.g. 14 (or 269).
A Decimal point.
2 Digits of minutes e.g. 06 or 57
2 Digits of seconds e.g. 09 or 43638
(plus other Digits for decimal seconds if required)
Clicking >.H substitutes Decimal Hours (or Degrees) for
the above in the X Register.
H.> Converts Decimal Hours (or Degrees) e.g. 9.374659 or
173.41237, to Hours (or Degrees) minutes and seconds (in the
format described for >.H input), which is substituted in the X
Register.
D>R Substitutes an equivalent Radians value of X in Degrees, in
the X Register. This also puts the calculator into Rad Mode
until the mode is changed.
R>D Substitutes an equivalent Degrees value of X in Radians, in
the X Register. This also puts the calculator in Deg. Mode
until the mode is changed.
Per Calculates the Permutation Y p X using the values in the X and
Y Registers in the sense of "X things taken Y at a time".
The result is substituted in the X Register.
This causes a Stack Drop.
Com Calculates the Combination YcX in a procedure similar to Per.
R>P Rectangular co-ordinates to Polar. The Y co-ord. and the X
co-ord. (pos. or neg.) are first positioned in the Y and X
Registers. Clicking R>P will then substitute the Angle in the
Y Register and the Radius in the X Register.
P>R Polar to Rectangular Co-ordinates. The angle in the current
Mode (equivalent to 0 to 180° positive or negative) and the
Radius are first positioned in the Y and X Registers, clicking
P>R will then substitute the Y and X co-ordinates in the Y and
X Registers.
X%Y Calculates X as a % of Y. The result is substituted in the X
Register leaving Y intact.
%Df % Difference between X and Y. Express the relative increase
(+) or decrease (-) of X compared with Y. The Base number Y
is left intact.
Su+ The Summation functions (Su+, SU-, MAv, DEV) use the values of
pairs of data positioned in the Y and X Registers to
progressively record the sums of X, X², Y, Y², X*Y and the
number of pairs of data, in special stores. After each pair is
positioned, click SU+.
Su- If an incorrect data pair has already been summed with Su+,
position this data pair in Y and X and click Su- to remove
from the summation.
MAv Calculates the Mean Average of the X values and substitutes it
in the X Register, and calculates the Mean Average of the Y
values and substitutes it in the Y Register.
Dev Calculates the Standard Deviation from the Mean of X and Y and
substitutes it in the X and Y Registers.
WARNING: When using the SUMMING functions, use CSt (Clear Stores)
in between different summing exercises. This will clear all
current Stores.
Hex This turns on a Hexadecimal conversion facility of the X
value. The equivalent Hex value of the Integer of X is
displayed below the X Register in a special box.
This continues until the Hex key is clicked again. This is a
toggle key. When it is on a small red dot is displayed on the
key.
Oct This turns on an Octal conversion facility of the X value. It
is similar in operation to Hex.
This is a toggle key.
Bin This turns on a Binary conversion facility of the X value. It
is similar in operation to Hex.
This is a toggle key.
If the Binary string is too long to be displayed (more than
24 characters) a comment will be shown, and the conversion
will be ignored.
PtX This will print out the X Register value, the Hex equivalent
(if the Hex is ON) and the current Remark. (First make sure
that the Printer is ON!).
This is a one-off operation.
Apr Auto Print Out. This will print out the information described
under PtX, progressively, until it is turned off, by clicking
on Apr a second time.
This is a toggle key.
REVERSE POLISH NOTATION
-----------------------
Four Registers (memories) form an automatic Register Stack. These are
labelled X, Y, Z and T, and are "Stacked" one on top of the other,
with the performing Stack X at the bottom in a window.
STACK LIFT:
-----------
A number is keyed into the X Register by progressively clicking on
Digit Keys.
When you do something else, by clicking on another non-digit key, it
is assumed that the number is complete in the X Register. If ENT is
clicked the value in the X Register is duplicated into the Y Register
(and Y into T and T into Z). This is a manual Stack Lift.
However if arithmetic involving X is to be performed (+, -, *, /)
firstly key in the second number and ENT, which will "lift" the Stack.
That is, T is lost over the top, Z lifts into T, Y lifts into Z, X (the
first number) lifts into Y, and the second number will occupy X.
STACK DROP:
-----------
Any arithmetic function will operate as: Y (function) X (e.g. Y/X).
The result will appear in the X Register and the Stack will "drop".
That is, Z will appear in the Y Register replacing the old Y, and T
will duplicate itself in the Z Register.
With the exception of functions such as Y^X which use X and Y as in
the above arithmetic functions, most codes will operate on X alone.
For example, keying Lgt will change the number in X to Log 10 X, or Pi
will place the value Pi in the X Register and cause an automatic Stack
Lift. Other operations which use both X and Y are described in the key
listings.
Generally a keyed in function overwrites the value in X with the new
value, as the function operates upon X. Exceptions are LsX, Pi, RcS
(Recall value in Store n), and Rn# (Random Number 1 to n), each of
which causes a Stack Lift.
"Last X" and "Last Y" (before the last operation) are retained in
special Stores and can be recalled into Register X by keying LsX or
LsY.
Generally a number-set keyed in after a keyed in function will cause a
Stack Lift. Exceptions occur when the previous function was C1X
(Clear X), or ENT when used to duplicate X into Y. In these cases the
new number will overwrite the value in X. X values can be stored in
the STORES, S1 to S10 and recalled into the Stack X Register. Store
arithmetic can be performed on the values in the STORES, e.g. SAr then
S3 then + which will add the values in the Stack Register X to the
value already in STORE S3. The value in X remains the same.
Hierarchical operational priorities and the establishment of a
required order of operational priorities by use of parentheses, as used
in algebraic Calculators (and computers) is not necessary with R.P.N.
It is handled by STACK manipulation, and what is more you can see it
all happening.
If you are not familiar with R.P.N., this program will literally teach
you how to use Reverse Polish Notation while you use it.
SPECIAL KEYS AND FUNCTIONS
--------------------------
BSp Backspace ... this operates like a normal Backspace key when a
number is being constructed, either from the screen or the
keyboard, stripping the last digit from the number (Backspace
on the keyboard is NOT an alternative in this case). However
once the number has been completed, that is, another key action
has occured it cannot be used. (Use C1X and start again).
Dsp Displays the current STORE Set and its identification Number
1 to 10. This is a Toggle Switch and a second click will
remove the STORE display.
\/ /\ Stores Set ...
These arrow symbols, if clicked, will roll the Stores Sets
DOWN or UP through Set 1 to Set 10 displaying values in the
current displayed Set. (S0 to S9).
The current displayed Set, then becomes the active Set.
e.g. if Set 7 is displayed and a value is transferred from the
X Register using StS into S3, then this value remains in
Stores Set 7, Store number S3 throughout subsequent other
Store Set operations (or until the value in Set 7, Store 3 is
changed).
If you wish to identify the original function which occurred
just prior to transferring the value which appears opposite
any Store in current Stores Set display, click on the
particular Store number e.g. S3.
The color of the number in the selected Store will change from
white to red to show that you have selected the correct Store,
and the last associated "prior" function will be displayed in
the Comment Box.
A second click will remove the color identification and the
comment.
<undo> If a function on a number has just been carried out on the
original value in the INPUT DISPLAY BOX and the X Register,
the operation can be undone by clicking on the Left arrow <
undo. (If it hasn't yet been carried out correct the number
with BSp or C1X).
When "special" numbers are used such as for RdX (Rounding)
or Fib they are displayed in the Comment Box while being
constructed.
To correct a special number whilst it is being constructed do
NOT use BSp, use the Right arrow undo > to strip last digits.
If the special number has already been "completed" and you
have clicked on ENT (e.g. for a STORE Arithmetic operation),
and you wish to correct or change the special number, clicking
on Right arrow undo > will enable you to undo and start again.
HEXADECIMAL Number Input
------------------------
Clicking on the Hex Key provides and displays equivalent X Integer -
number Hex numbers.
However, to input a number in Hex form (whether or not Hex conversion
and display is on), before constructing the Hex number, the letter H
MUST be pressed on the computer keyboard. Tis will appear to be
ignored in the displays, but the calculator knows that you are
entering a Hex number and will treat it accordingly.
Of course the A to F components of the Hex number must be pressed on
the Computer keyboard, but the digits can either keyboard or screen
key generated.
If you forget to press H and attempt to use an A to F key as a Hex
number component you will be reminded in the Comment Box to press H
before a Hex number! If you think you are entering a Hex number which
is all digits, and you have forgotten to press H first, it will be
treated as a decimal number. (Your fault, not the Calculator's).
Each time you wish to enter a Hex number it must be individually
preceded with H.
All calculations and functions can combine a mixture of numbers input
in Hex or Decimal form.
(If the Hex display is on, the results are of course given in both
forms, but remember that a Hex equivalent only represents the Integer
of the X decimal number).
OCTAL Number Input
------------------
The precedure in similar to that for inputting Hex numbers, except
that the letter O must be pressed on the computer keyboard, before
constructing the Octal number (either from the screen key numbers or
the computer keyboard).
BINARY Number Input
-------------------
The procedure is similar to that for inputting Hex numbers, except
that the letter Z (mainly because its probably the last thing you
would probably want to do) must be pressed on the Computer keyboard,
before constructing the Binary number from ones and zeros (either from
the screen key numbers or the computer keyboard).
DEGREES / RADIANS MODE
----------------------
The Deg or Rad Box provides a Toggle switch to change future
operations, when angles must be expressed in the current mode.
However it will not change previous Angle values if they have been
saved in Registers or Stores in a different mode so either REMEMBER!
or DON'T MIX! during any one exercise involving Angles.
END OF CALC.MANUAL